#ifndef __NODE_H__
  #define __NODE_H__

namespace memory_management {

//! A simple node for list

/*!
A minimal node implementation for list.
*/

  template <class T>
  class node {
  private:
    node *next;
    T value;

    //! assignment operator: not allowed
    node &operator=(const node &n);

    //! copy constructor: not allowed
    node(const node &n);

  public:
    //! sets the value of this node
    void set_value(const T &value) {
      this->value = value;
    } // set_value

    //! returns the value of this node
    const T &get_value() const {
      return value;
    } // get_value

    //! sets the next node to this node
    void set_next(const node *next) {
      this->next = const_cast<node*>(next);
    } // set_next

    //! returns the next node to this node
    node *get_next() const {
      return next;
    } // get_next

    //! default constructor
    node() : next(0), value(0) {
      // nothing to do
    } // node

    //! constructor
    node(const T &value) : next(0), value(value) {
      // nothing to do
    } // node

    //! destructor (non-virtual: please do not inherit from this class)
    ~node() {
      // nothing to do
    } // ~node

  }; // class node

} // namespace memory_management

#endif
